Directional interpolation method and video encoding/decoding apparatus and method using the directional interpolation method

ABSTRACT

A directional interpolation method and a video encoding/decoding apparatus and method using the directional interpolation method. The directional interpolation method includes selecting one of a plurality of directional interpolation modes for a predetermined-size block based on the characteristics of input image data, performing directional interpolation on the predetermined-size block based on the selected directional interpolation mode, and generating mode information indicating the selected directional interpolation mode.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application claims priority from Korean Patent Application No.10-2006-0006804, filed on Jan. 23, 2006, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Methods and apparatuses consistent with the present invention relate tomotion compensation, and more particularly, to a video encoding/decodingusing directional interpolation for improving motion compensationaccuracy.

2. Description of the Related Art

According to the moving picture experts group (MPEG)-1, MPEG-2, MPEG-4,and H.264 encoding standards, P-picture encoding, in which the currentpicture is encoded by referring to a previous picture, and B-pictureencoding, in which the current picture is encoded by referring to both aprevious picture and a future picture, are adopted, and motioncompensation is performed based on P-picture encoding and B-pictureencoding. In particular, according to the MPEG-4 or H.264 encodingstandard, motion compensation is performed in units of a macroblock oron each of a plurality of blocks obtained by dividing a macroblock.Motion compensation is performed after interpolation for obtaining halfpixels, quarter pixels, or one eighth pixels is performed on a blockcomposed of integer pixels to improve the accuracy of data.

FIG. 1 is a reference diagram for explaining half-pixel interpolation.

Referring to FIG. 1, gray boxes indicate original pixels and white boxesindicate interpolation pixels. The original pixels mean integer pixels.In FIG. 1, the interpolation pixels 5, 6, 7, 8, and 9 indicate halfpixels. Each of the half pixels is obtained based on its vertically orhorizontally adjacent integer pixels or half pixels. For example, thehalf pixel 5 is obtained based on the integer pixels 1 and 2 and thehalf pixel 8 is obtained based on the integer pixels 3 and 4. The halfpixel 6 is obtained based on the integer pixels 1 and 3 and the halfpixel 7 is obtained based on the integer pixels 2 and 4. The half pixel9 is obtained based on the half pixels 5 and 8 or the half pixels 6 and7. Although the number of integer pixels is limited to 4 for convenienceof explanation, the number of pixels used in interpolation may beadjusted properly. For example, the half pixel 5 may be obtained basedon not only the integer pixels 1 and 2 but also its horizontallyadjacent integer pixels. The interpolation pixels are indicated byintegers within the same range as the original pixels. For example, ifthe original pixels are indicated by integers within a range of 0-255,the interpolation pixels also are indicated by integers within a rangeof 0-255.

FIG. 2 is a reference diagram for explaining interpolation used forquarter pixel interpolation of luminance components in H.264, in whichsome pixels of a predetermined motion compensation block areillustrated. In FIG. 2, gray boxes indicate integer pixels and whiteboxes indicate interpolation pixels.

In interpolation of FIG. 2, a plurality of pixels, i.e., 6 pixels, areused to obtain a single interpolation pixel. In addition, each of thepixels used in interpolation is given a weight. To this end, a 6-tapfilter is used. The 6-tap filter has 6 tap values. The tap values meanweights given to the pixels used in interpolation. For example, tapvalues (1, −5, 20, 20, −5, 1) may be used. Various numbers of pixels maybe used in interpolation and various weights, i.e., tap values, may begiven thereto.

<Half Pixel b>

To obtain the half pixel b, 6 integer pixels E, F, G, H, I, and J thatare horizontally adjacent to the half pixel b are used. If the foregoing6-tap filter is applied to the integer pixels E, F, G, H, I, and J, ahorizontal sum b1 is obtained as follows:

b1=(E−5*F+20*G+20*H−5*I+J)   (1)

Next, 16 is added to the horizontal sum b1, the result of the additionis divided by 32, the result of the division is made an integer, andrange adjustment is performed on the integer, thereby finally obtainingthe half pixel b, as follows:

b=Clip1Y((b1+16)>>5)   (2),

where the result of addition, i.e., b1+16, is made an integer byrounding off. ┌>>5┘ indicates dividing the result of the addition by 32(=2⁵) and then rounding off the result of the division to the nearestinteger. This is because, since the sum of the tap values of the 6-tapfilter is 32 (i.e., 32 pixel values are added), the average can beobtained by dividing the result of the addition by 32. Clip1Y( ) mapsthe obtained integer, i.e., (b1+16)>>5, to one within a range ofintegers indicating the original pixels (integer pixels). For example,when integer pixels are indicated by integers within a range of 0-255,if the obtained integer falls outside this range, Clip1Y( ) maps theobtained integer to a predetermined value within the range.

<Half Pixel h>

To obtain the half pixel h, 6 integer pixels A, C, G, M, R, and T thatare vertically adjacent to the half pixel h are used. If the foregoing6-tap filter is applied to the integer pixels A, C, G, M, R, and T, avertical sum h1 is obtained as follows:

h1=(A−5*C+20*G+20*M−5*R+T)   (3)

Next, 16 is added to the vertical sum h1, the result of the addition isdivided by 32, an average is obtained by rounding off the result ofdivision, and range adjustment is performed on the average, therebyfinally obtaining the half pixel h, as follows:

h=Clip1Y((h1+16)>>5)   (4)

<Half Pixel j>

The half pixel j can be obtained in a similar manner as the half pixelh. In other words, the half pixel j is obtained as follows:

j1=(cc−5*dd+20*h1+20*m1−5*ee+ff) or

j1=(aa−5*bb+20*b1+20*s1−5*gg+hh)   (5)

j=Clip1Y((1+512)>>10)   (6)

<Quarter Pixel a>

To obtain the quarter pixel a, a horizontal average filter of halfpixels and half pixels that are adjacent to the quarter pixel a is used.For example, the quarter pixel a is obtained as follows:

a=(G+b+1)>>1   (7),

where (G+b+1) >>1 indicates adding 1 to (G+b), dividing the result ofthe addition by 2, and making the result of division an integer byrounding off the result of division to the nearest integer. Theremaining quarter pixels c, d, n, f, j, k, and q also are obtained asfollows:

c=(H+b+1)>>1   (8)

d=(G+h+1)>>1   (9)

n=(M+h+1)>>1   (10)

f=(b+j+1)>>1   (11)

i=(h+j+1)>>1   (12)

k=(j+m+1)>>1   (13)

FIG. 3 is a view for explaining interpolation of chrominance componentsin H.264. In interpolation according to H.264, luminance components andchrominance components are processed in different manners. Thepredictive interpolation value of a chrominance signal is obtained byperforming linear interpolation on integer pixels with ⅛-pixel accuracy.The motion vector of a chrominance frame is ½ the magnitude of that of aluminance frame. Once the motion vector is determined, a predictiveinterpolation value v is determined as follows:

v=((8−dx)(8−dy)*A+dx(8−dy)*B+(8−dx)*dy*C+dx*dy*D+32)>>6   (15),

where dx and dy are values indicating the motion vector of thechrominance frame.

As can be appreciated from FIGS. 2 and 3, related art sub-pixelinterpolation is performed only horizontally or vertically withoutconsidering the characteristics of a video, resulting in degradation ofthe accuracy of interpolation and motion compensation using theinterpolation.

SUMMARY OF THE INVENTION

The present invention provides an interpolation method having highaccuracy and a video encoding/decoding apparatus using the interpolationmethod.

According to one aspect of the present invention, there is provided adirectional interpolation method including selecting one of a pluralityof directional interpolation modes for a predetermined-size block basedon characteristics of input video data, performing directionalinterpolation on the predetermined-size block based on the selecteddirectional interpolation mode, and generating mode informationindicating the selected directional interpolation mode.

The characteristics of the input image data indicate edge informationand the selection of the directional interpolation mode furthercomprises calculating a gradient for each of a plurality of directionswith respect to each of respective pixels included in thepredetermined-size block.

The selection of the directional interpolation mode may be performed byselecting a direction having a smallest gradient and selecting adirectional interpolation mode corresponding to the selected direction.

According to another aspect of the present invention, there is provideda directional interpolation method including selecting one of aplurality of directional interpolation modes for each pixel based oncharacteristics of input video data and performing directionalinterpolation on the pixel based on the selected directionalinterpolation mode.

According to still another aspect of the present invention, there isprovided a directional interpolation method including extracting modeinformation from a received bitstream, in which the mode informationindicates a directional interpolation mode that is selected among aplurality of directional interpolation modes based on characteristics ofinput video data, and performing directional interpolation on apredetermined-size block based on the extracted mode information.

According to yet another aspect of the present invention, there isprovided a motion compensation method using a directional interpolationmethod. The directional interpolation method includes selecting one of aplurality of directional interpolation modes for a predetermined-sizeblock based on characteristics of input video data, performingdirectional interpolation on the predetermined-size block based on theselected directional interpolation mode, and generating mode informationindicating the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a motion compensation method using a directional interpolationmethod. The directional interpolation method includes selecting one of aplurality of directional interpolation modes for each pixel based oncharacteristics of input video data and performing directionalinterpolation on the pixel based on the selected directionalinterpolation mode.

According to yet another aspect of the present invention, there isprovided a motion compensation method using a directional interpolationmethod. The directional interpolation method includes extracting modeinformation from a received bitstream, in which the mode informationindicates a directional interpolation mode that is selected among aplurality of directional interpolation modes based on characteristics ofinput video data, and performing directional interpolation on apredetermined-size block based on the extracted mode information.

According to yet another aspect of the present invention, there isprovided a video encoding method using a motion compensation methodapplying a directional interpolation method. The directionalinterpolation method includes selecting one of a plurality ofdirectional interpolation modes for each of a plurality ofpredetermined-size blocks based on characteristics of input video data,performing directional interpolation on the predetermined-size blocksbased on the selected directional interpolation mode, and generatingmode information indicating the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a video encoding method using a motion compensation methodapplying a directional interpolation method. The directionalinterpolation method includes selecting one of a plurality ofdirectional interpolation modes for each pixel based on characteristicsof input video data and performing directional interpolation on thepixel based on the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a video decoding method using a motion compensation methodapplying a directional interpolation method. The directionalinterpolation method includes extracting mode information from areceived bitstream, in which the mode information indicates adirectional interpolation mode that is selected among a plurality ofdirectional interpolation modes based on characteristics of input videodata, and performing directional interpolation on a predetermined-sizeblock based on the extracted mode information.

According to yet another aspect of the present invention, there isprovided a directional interpolation apparatus including a directionalinterpolation mode selection unit, a directional interpolation unit, anda mode information generation unit. The directional interpolation modeselection unit selects one of a plurality of directional interpolationmodes for a predetermined-size block based on characteristics of inputvideo data. The directional interpolation unit performs directionalinterpolation on the predetermined-size block based on the selecteddirectional interpolation mode. The mode information generation unitgenerates mode information indicating the selected directionalinterpolation mode.

According to yet another aspect of the present invention, there isprovided a directional interpolation apparatus including a directionalinterpolation mode selection unit and a directional interpolation unit.The directional interpolation mode selection unit selects one of aplurality of directional interpolation modes for each of a plurality ofpixels based on characteristics of input video data. The directionalinterpolation unit performs directional interpolation on the pixelsbased on the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a directional interpolation apparatus including a modeinformation extraction unit and a directional interpolation unit. Themode information extraction unit extracts mode information from areceived bitstream, in which the mode information indicates adirectional interpolation mode that is selected among a plurality ofdirectional interpolation modes based on characteristics of input videodata. The directional interpolation unit performs directionalinterpolation on a predetermined-size block based on the extracted modeinformation.

According to yet another aspect of the present invention, there isprovided a computer-readable recording medium having recorded thereon aprogram for a directional interpolation method. The directionalinterpolation method includes selecting one of a plurality ofdirectional interpolation modes for each of a plurality ofpredetermined-size blocks based on characteristics of input video data,performing directional interpolation on the predetermined-size blocksbased on the selected directional interpolation mode, and generatingmode information indicating the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a computer-readable recording medium having recorded thereon aprogram for a directional interpolation method. The directionalinterpolation method includes selecting one of a plurality ofdirectional interpolation modes for each pixel based on characteristicsof input video data and performing directional interpolation on thepixel based on the selected directional interpolation mode.

According to yet another aspect of the present invention, there isprovided a computer-readable recording medium having recorded thereon aprogram for a directional interpolation method. The directionalinterpolation method includes extracting mode information from areceived bitstream, in which the mode information indicates adirectional interpolation mode that is selected among a plurality ofdirectional interpolation modes based on characteristics of input videodata, and performing directional interpolation on a predetermined-sizeblock based on the extracted mode information.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will become moreapparent by describing in detail exemplary embodiments thereof withreference to the attached drawings, in which:

FIG. 1 is a reference diagram for explaining half-pixel interpolation;

FIG. 2 is a reference diagram for explaining interpolation used forquarter pixel interpolation of luminance components in H.264;

FIG. 3 is a view for explaining interpolation of chrominance componentsin H.264;

FIG. 4 is a block diagram of a video encoder using an interpolationmethod according to an exemplary embodiment of the present invention;

FIG. 5 is a view for explaining interpolation according to an exemplaryembodiment of the present invention;

FIGS. 6A through 6E are views for explaining interpolation with respectto a pixel A among pixels illustrated in FIG. 5 according to anexemplary embodiment of the present invention;

FIG. 7 is a detailed block diagram of an interpolation unit according toan exemplary embodiment of the present invention;

FIGS. 8A through 8E are views for explaining interpolation with respectto a pixel B among the pixels illustrated in FIG. 5 according to anexemplary embodiment of the present invention;

FIGS. 9A through 9C are views for explaining interpolation with respectto a pixel C among the pixels illustrated in FIG. 5 according to anexemplary embodiment of the present invention;

FIG. 10 is a flowchart illustrating an interpolation method implementedby an interpolation unit of the video encoder of FIG. 4 according to anexemplary embodiment of the present invention;

FIG. 11 is a block diagram of a video decoder using an interpolationmethod according to an exemplary embodiment of the present invention;and

FIG. 12 is a flowchart illustrating an interpolation method implementedby an interpolation unit of the video decoder of FIG. 11 according to anexemplary embodiment of the present invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, exemplary embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings.

FIG. 4 is a block diagram of a video encoder using an interpolationmethod according to an exemplary embodiment of the present invention.The video encoder of FIG. 4 may be an MPEG-2, MPEG-4, or H.264 encoder.

First, input video data is divided into a plurality of 16×16macroblocks.

An encoder control unit 410 serves as a bitrate controller to determinea quantization coefficient for each block so that a desired bitrate forthe entire sequence and a target bit for each picture can be achieved.

A transform/quantization unit 420 transforms the input image data toremove spatial redundancy of the input image data. Thetransform/quantization unit 420 quantizes transform coefficientsobtained by transform encoding using a predetermined quantization step,thereby obtaining two-dimensional N×M data composed of the quantizedtransform coefficients. A discrete cosine transform (DCT) or an integertransform may be used for the transform. The quantization is performedusing a predetermined quantization step.

An inverse quantization/inverse transform unit 430 inversely quantizesthe image data that is quantized by the transform/quantization unit 420and inversely transforms the inversely quantized image data using, forexample, an inverse DCT (IDCT).

A frame memory 450 stores the image data that is inverselyquantized/inversely transformed by the inverse quantization/inversetransform unit 430 in frame units.

A motion estimation/motion compensation (ME/MC) unit 470 estimates amotion vector (MV) and a sum of absolute differences (SAD) for eachmacroblock using input image data of the current frame and image data ofa previous frame stored in the frame memory 450.

An entropy-encoding unit 480 receives the quantized transformcoefficients from the transform/quantization unit 420, motion vectorinformation from the ME/MC unit 470, and information required fordecoding such as coding type information and quantization stepinformation from the encoder control unit 410, performsentropy-encoding, and outputs a final bitstream.

The video encoder of FIG. 4 may also further include a deblocking filter440 and an intraframe prediction unit 460.

The deblocking filter 440 performs filtering to remove a blocking effectoccurring in a motion-compensated image due to quantization and outputsthe result of filtering to the frame memory 450.

The intraframe prediction unit 460 obtains a predictor for each block ormacroblock in a spatial domain of an intra macroblock, obtains adifference between the obtained predictor and the intra macroblock, andtransmits the difference to the transform/quantization unit 420.

The ME/MC unit 470 includes an interpolation unit (not shown) accordingto an exemplary embodiment of the present invention. The interpolationunit performs interpolation to improve the resolution of image requiredfor the generation of a motion compensation value.

Hereinafter, an interpolation method (interpolation algorithm)implemented by the interpolation unit will be described with referenceto FIGS. 5 through 10.

In FIG. 5, gray boxes indicate integer pixels and white boxes indicateinterpolation pixels. In the current exemplary embodiment of the presentinvention, interpolation with respect to pixels A, B, and C will bedescribed.

FIGS. 6A through 6E are views for explaining interpolation with respectto the pixel A among pixels illustrated in FIG. 5. In FIGS. 6A through6E, directional interpolation values in 90°, 22.5°, 157.5°, 45°, and135° directions are illustrated.

In FIG. 6A, a directional interpolation value A_int90 in the 90°direction with respect to the pixel A is generated by applying anaverage filter to integer pixels P13 and P23 that are adjacent to thepixel A as follows. In the current exemplary embodiment of the presentinvention, the integer pixels P13 and P23 are reconstructed integerpixels.

A _(—) int90=(P13+P23)/2   (16)

In FIG. 6B, a directional interpolation value A_int22.5 in the 22.5°direction with respect to the pixel A is generated by applying anaverage filter to integer pixels P14 and P22 that are adjacent to thepixel A as follows:

A _(—) int22.5=(P14+P22)/2   (17)

In FIG. 6C, a directional interpolation value A_int157.5 in the 157.5°direction with respect to the pixel A is generated by applying anaverage filter to integer pixels P12 and P24 that are adjacent to thepixel A as follows:

A _(—) int157.5=(P12+P24)/2   (18)

In FIG. 6D, a directional interpolation value A_int45 in the 45°direction with respect to the pixel A is generated by applying anaverage filter to integer pixels P13, P14, P22, and P23 that areadjacent to the pixel A as follows:

A _(—) int45=(P13+P14+P22+P23)/4   (19)

In FIG. 6E, a directional interpolation value A_int135 in the 135°direction with respect to the pixel A is generated by applying anaverage filter to integer pixels P12, P13, P23, and P24 that areadjacent to the pixel A as follows:

A _(—) int135=(P12+P13+P23+P24)/4   (20)

Directional interpolation may be performed in various other angledirections in addition to the 90°, 22.5°, 157.5°, 45°, and 135°directions used as examples in FIG. 6.

In the current exemplary embodiment of the present invention, one of aplurality of directions is selected for each pixel, directionalinterpolation according to the selected direction is performed on thepixel, and information about the selected direction is transmitted to adecoding unit.

The interpolation unit of the ME/MC unit 470 according to the currentexemplary embodiment of the present invention selects one of a pluralityof directions based on the characteristics of an image for eachsub-block, performs directional interpolation on pixels of the sub-blockaccording to the selected direction, generates mode informationindicating a directional interpolation mode according to the selecteddirection, and transmits the generated mode information to theentropy-encoding unit 480.

FIG. 7 is a detailed block diagram of the interpolation unit of theME/MC unit 470.

A directional interpolation mode selection unit 720 selects adirectional interpolation mode to be applied to a predetermined-sizesub-block. The selection is made based on the characteristics of animage corresponding to the sub-block, e.g., edge information of theimage. The edge information can be obtained by calculating a gradientfor each direction and selecting a final direction using the calculatedgradients.

For example, in FIG. 6, when a gradient for the 90° direction isD_(—)90, D_(—)90 is obtained using (|P12−P22|+|P13−P23|+|P14−P24|)/3.Similarly, a gradient D_(—)22.5 for the 22.5° direction is obtainedusing (↑P13−P21|+|P14−P22|+|P15−P23|)/3. A gradient D_(—)157.5 for the157.5° direction is obtained using (|P11−P23|+|P12−P24|+|P13−P25|)/3. Agradient D_(—)45 for the 45° direction is obtained using(|P13−P22|+|P14−P23|)/2. A gradient D_(—)135 for the 135° direction isobtained using (↑P12−P23|+|P13−P24|)/2.

The directional interpolation mode selection unit 720 obtains a gradientfor each of a plurality of directions for pixels of the sub-block andcompares the gradients to select the final direction. For example, ifthe gradient for the 45° direction is smallest, the 45° direction isselected as an interpolation direction.

A directional interpolation unit 740 performs directional interpolationaccording to the 45° direction on the pixels of the sub-block.

A mode information generation unit 760 generates mode informationindicating a directional interpolation mode according to the 45°direction and transmits the generated mode information to theentropy-encoding unit 480 of FIG. 4.

A sub-block used in the current exemplary embodiment of the presentinvention may be an 8×8 block, an 8×16 block, a 16×8 block, a 16×16block, or a sub-block having various sizes and shapes. In particular,when input video data has a specific pattern, an optimal directionalinterpolation mode may be searched for each block having a shapecorresponding to the pattern and directional interpolation may beperformed according to the selected direction based on the result of thesearch.

According to another exemplary embodiment of the present invention, oneof a plurality of directional interpolation modes is selected for eachpixel according to a predetermined criterion and directionalinterpolation is performed according to the selected direction. Forexample, a gradient for each direction is calculated for each pixel anddirectional interpolation selected according to the results ofcalculation is performed.

For example, in FIG. 6, after the gradientD_(—)90=(↑P12−P22|+|P13−P23|+|P14−P24|)/3, the gradientD_(—)22.5=(|P13−P21|+|P14−P22|+|P15−P23|)/3, the gradientD_(—)157.5=(|P11−P23|+|P12−P24|+|P13−P25|)/3, the gradientD_(—)45=(|P13−P22|+|P14−P23|)/2, and the gradientD_(—)135=(|P12−P23|+|P13−P24|)/2 according to the plurality ofdirections are calculated, the direction having the smallest gradient isselected as the final direction. In the current exemplary embodiment ofthe present invention, since a directional interpolation mode isselected according to the same criterion in the video encoder and thevideo decoder, it is not necessary to transmit separate directioninformation to the decoding unit. Thus, in the current exemplaryembodiment of the present invention, the mode information generationunit 760 of FIG. 7 is not required.

FIGS. 8A through 8E are views for explaining interpolation with respectto the pixel B among the pixels illustrated in FIG. 5. In FIGS. 8Athrough 8E, directional interpolation values in 0°, 112.5°, 67.5°, 135°,and 45° directions are illustrated.

In FIG. 8A, a directional interpolation value B_int0 in the 0° directionwith respect to the pixel B is generated using the average filter ofinteger pixels P22 and P23 that are adjacent to the pixel B as follows:

B _(—) int0=(P22+P23)/2   (21)

In FIG. 8B, a directional interpolation value B_int112.5 in the 112.5°direction with respect to the pixel B is generated using the averagefilter of integer pixels P12 and P33 that are adjacent to the pixel B asfollows:

B _(—) int112.5=(P12+P33)/2   (22)

In FIG. 8C, a directional interpolation value B_int67.5 in the 67.5°direction with respect to the pixel B is generated using the averagefilter of integer pixels P13 and P32 that are adjacent to the pixel B asfollows:

B _(—) int67.5=(P13+P32)/2   (23)

In FIG. 8D, a directional interpolation value B_int135 in the 135°direction with respect to the pixel B is generated using the averagefilter of integer pixels P11, P22, P33, P12, P23, and P34 that areadjacent to the pixel B as follows:

B _(—) int135=(P11+P22+P33+P12+P23+P34)/6   (24)

In FIG. 8E, a directional interpolation value B_int45 in the 45°direction with respect to the pixel B is generated using the averagefilter of integer pixels P13, P22, P31, P14, P23, and P32 that areadjacent to the pixel B as follows:

B _(—) int45=(P13+P22+P31+P14+P23+P32)/6   (25)

Directional interpolation may be performed in various-angle directionsin addition to the 0°, 112.5°, 67.5°, 135°, and 45° directions taken asexamples in FIG. 8.

When one of a plurality of directional interpolation modes is selectedfor each pixel, a gradient for each direction is calculated and a finaldirection is selected in the same manner as for the pixel A.

FIGS. 9A through 9C are views for explaining interpolation with respectto the pixel C among the pixels illustrated in FIG. 5. In FIGS. 9Athrough 9C, directional interpolation values in 0°, 135°, and 45°directions are illustrated.

In FIG. 9A, a directional interpolation value C_int0 in the 0° directionwith respect to the pixel C is generated using the average filter ofinteger pixels P12, P13, P22, and P23 that are adjacent to the pixel Cas follows:

C _(—) int0=(P12+P13+P22+P23)/4   (26)

In FIG. 9B, a directional interpolation value C_int135 in the 135°direction with respect to the pixel C is generated using the averagefilter of integer pixels P12 and P23 that are adjacent to the pixel C asfollows:

C _(—) int135=(P12+P23)/2   (27)

In FIG. 9C, a directional interpolation value C_int45 in the 45°direction with respect to the pixel C is generated using the averagefilter of integer pixels P13 and P22 that are adjacent to the pixel B asfollows:

C _(—) int45=(P13+P22)/2   (28)

The directional interpolation mode selection unit 720 of theinterpolation unit may selectively use H.264 interpolation. In otherwords, an H.264 interpolation mode or one of a plurality of otherdirectional interpolation modes may be used. For example, when gradientsfor a plurality of directions obtained for a predetermined sub-blockexhibit uniform distribution, H.264 interpolation may be used, insteadof selecting one of the plurality of directions.

Although only pixels that are adjacent to an interpolation pixel areused in the current exemplary embodiment of the present invention,pixels in a wider range may be used for H.264 interpolation.

In addition, while half-pixel motion compensation is considered in thecurrent exemplary embodiment of the present invention, the presentinvention can also be applied to quarter-pixel motion compensation.

FIG. 10 is a flowchart illustrating an interpolation method implementedby the interpolation unit of the video encoder of FIG. 4.

In operation 1020, one of a plurality of directional interpolation modesis selected based on the characteristics of input image data. Forexample, a gradient for each of a plurality of directions is obtainedfor pixels of a predetermined-size block and the obtained gradients arecompared to select an interpolation direction. For example, if thegradient for the 45° direction is smallest, the 45° direction isselected as the final direction.

In operation 1040, directional interpolation is performed oninterpolation pixels of the block according to the direction selected inoperation 1020, e.g., the 45° direction.

In operation 1060, mode information indicating the selected directionfor the block is generated and is transmitted to the decoding unit.

Alternatively, in operation 1020, when the gradients for the directionsobtained for the block exhibit uniform distribution, H.264 interpolationmay be used, instead of selecting one of the plurality of directions. Inthis case, H.264 interpolation is performed in operation 1040 and modeinformation indicating H.264 interpolation is generated in operation1060.

Alternatively, interpolation may be performed according to a directionselected for each of the pixels of the block based on a predeterminedcriterion. For example, a gradient for each of the directions isobtained for each of the pixels of the block and interpolation isperformed according to a direction selected based on the calculatedgradients. In this case, separate mode information is not generated.

FIG. 11 is a block diagram of a video decoder using an interpolationmethod according to an exemplary embodiment of the present invention.

Referring to FIG. 11, the video decoder includes an entropy-decodingunit 1110, an inverse quantization unit 1120, an inverse transform unit1130, a frame memory 1140, an MC unit 1150, and an addition unit 1160.

The entropy-decoding unit 1110 entropy-decodes an input encodedbitstream to extract image data, motion vector information, and modeinformation indicating an interpolation direction. The extracted imagedata is input to the inverse quantization unit 1120 and the extractedmotion vector information and mode information are input to the MC unit1150.

The inverse quantization unit 1120 inversely quantizes the inputextracted video data.

The inverse transform unit 1130 inversely transforms the inverselyquantized video data.

The MC unit 1150 performs motion compensation that is the same as thatperformed in a conventional video decoder. For interpolation pixels, theMC unit 1150 determines an interpolation direction for eachpredetermined-size block, e.g., each sub-block, using the input modeinformation and performs directional interpolation on interpolationpixels of the sub-block according to the determined interpolationdirection.

The addition unit 1160 adds values output from the inverse transformunit 1130 and the MC unit 1150 and outputs the result of addition to adisplay unit (not shown) and the frame memory 1140.

According to another exemplary embodiment of the present invention,interpolation is performed using a method of determining aninterpolation direction in the video encoder, instead of using separatemode information. In this case, since mode information indicating aninterpolation direction is not inserted into an input bitstream, theextraction of the mode information by the entropy-decoding unit 110 andthe output of the mode information to the MC unit 1150 are not required.

FIG. 12 is a flowchart illustrating an interpolation method implementedby the video decoder of FIG. 11.

In operation 1220, an input encoded bitstream is entropy-decoded toextract mode information indicating a directional interpolation mode.Here, the directional interpolation mode indicated by the modeinformation is selected based on the characteristics of input imagedata.

In operation 1240, an interpolation direction is determined for eachpredetermined-size block, e.g., each sub-block, using the extracted modeinformation.

In operation 1260, interpolation is performed on interpolation pixels ofthe predetermined-size block according to the determined interpolationdirection.

According to another exemplary embodiment of the present invention,interpolation is performed using a method of determining aninterpolation direction in the video encoder, instead of using separatemode information. For example, a gradient for each direction iscalculated for each pixel and directional interpolation is performedaccording to an interpolation direction selected based on the calculatedgradients. In this case, since mode information indicating aninterpolation direction is not inserted into an input bitstream, theextraction of the mode information is not required.

As described above, according to the exemplary embodiments of thepresent invention, directional interpolation is performed adaptivelyaccording to the characteristics of input image data during motioncompensation, thereby improving motion compensation efficiency and thusencoding efficiency.

Meanwhile, the exemplary embodiments of the present invention can alsobe embodied as computer-readable code on a computer-readable recordingmedium. The computer-readable recording medium is any data storagedevice that can store data which can be thereafter read by a computersystem. Examples of the computer-readable recording medium includeread-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetictapes, floppy disks, optical data storage devices, and carrier waves(e.g., transmission over the Internet). The computer-readable recordingmedium can also be distributed over network coupled computer systems sothat the computer-readable code is stored and executed in a distributedfashion.

While the present invention has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the present invention as defined by the following claims.

1. A directional interpolation method comprising: selecting one of aplurality of directional interpolation modes for a predetermined-sizeblock based on characteristics of input video data; performingdirectional interpolation on the predetermined-size block based on theselected directional interpolation mode; and generating mode informationindicating the selected directional interpolation mode.
 2. Thedirectional interpolation method of claim 1, wherein the characteristicsof the input image data indicate edge information, and the selection ofthe directional interpolation mode further comprises calculating agradient for each of a plurality of directions with respect to each ofrespective pixels included in the predetermined-size block.
 3. Thedirectional interpolation method of claim 2, wherein the selection ofthe directional interpolation mode is performed by selecting a directionhaving a smallest gradient and selecting a directional interpolationmode corresponding to the selected direction.
 4. The directionalinterpolation method of claim 2, wherein the plurality of directionscomprise at least one angle direction between horizontal and verticaldirections.
 5. The directional interpolation method of claim 4, whereinthe respective pixels comprise at least one of a one-half pixel, aone-quarter pixel and a one-eighth pixel.
 6. A directional interpolationmethod comprising: selecting one of a plurality of directionalinterpolation modes for each pixel based on characteristics of inputvideo data; and performing directional interpolation on the pixel basedon the selected directional interpolation mode.
 7. The directionalinterpolation method of claim 6, wherein the characteristics of theinput image data indicate edge information and the selection of thedirectional interpolation mode further comprises calculating a gradientfor each of a plurality of directions for the pixel.
 8. The directionalinterpolation method of claim 7, wherein the selection of thedirectional interpolation mode is performed by selecting a directionhaving a smallest gradient and selecting a directional interpolationmode corresponding to the selected direction.
 9. The directionalinterpolation method of claim 7, wherein the plurality of directionscomprise at least one angle direction between horizontal and verticaldirections.
 10. The directional interpolation method of claim 9, whereinthe respective pixels comprise at least one of a one-half pixel, aone-quarter pixel and a one-eighth pixel.
 11. A directionalinterpolation method comprising: extracting mode information from areceived bitstream, the mode information indicating a directionalinterpolation mode that is selected among a plurality of directionalinterpolation modes based on characteristics of input video data; andperforming directional interpolation on a predetermined-size block basedon the extracted mode information.
 12. The directional interpolationmethod of claim 11, wherein the characteristics of the input image dataindicate edge information, and the selection of the directionalinterpolation mode is performed based on a gradient for each of aplurality of directions with respect to each of respective pixelsincluded in the predetermined-size block.
 13. A video encoding methodusing a directional interpolation method, the directional interpolationmethod comprising: selecting one of a plurality of directionalinterpolation modes for a predetermined-size block based oncharacteristics of input video data; performing directionalinterpolation on the predetermined-size block based on the selecteddirectional interpolation mode; and generating mode informationindicating the selected directional interpolation mode.
 14. A videoencoding method using a directional interpolation method, thedirectional interpolation method comprising: selecting one of aplurality of directional interpolation modes for each pixel based oncharacteristics of input video data; and performing directionalinterpolation on the pixel based on the selected directionalinterpolation mode.
 15. A video decoding method using a directionalinterpolation method, the directional interpolation method comprising:extracting mode information from a received bitstream, the modeinformation indicating a directional interpolation mode that is selectedamong a plurality of directional interpolation modes based oncharacteristics of input video data; and performing directionalinterpolation on a predetermined-size block based on the extracted modeinformation.
 16. A directional interpolation apparatus comprising: adirectional interpolation mode selection unit which selects one of aplurality of directional interpolation modes for a predetermined-sizeblock based on characteristics of input video data; a directionalinterpolation unit which performs directional interpolation on thepredetermined-size block based on the selected directional interpolationmode; and a mode information generation unit which generates modeinformation indicating the selected directional interpolation mode. 17.The directional interpolation apparatus of claim 16, wherein thecharacteristics of the input image data indicate edge information andthe directional interpolation mode selection unit calculates a gradientfor each of a plurality of directions with respect to each of respectivepixels included in the predetermined-size block.
 18. The directionalinterpolation apparatus of claim 17, wherein the directionalinterpolation mode selection unit selects a direction having a smallestgradient and selects a directional interpolation mode corresponding tothe selected direction.
 19. The directional interpolation apparatus ofclaim 17, wherein the plurality of directions comprise at least oneangle direction between horizontal and vertical directions.
 20. Thedirectional interpolation apparatus of claim 19, wherein the respectivepixels comprise at least one of a one-half pixel, a one-quarter pixeland a one-eighth pixel.
 21. A directional interpolation apparatuscomprising: a directional interpolation mode selection unit whichselects one of a plurality of directional interpolation modes for eachof a plurality of pixels based on characteristics of input video data;and a directional interpolation unit which performs directionalinterpolation on the pixels based on the selected directionalinterpolation mode.
 22. The directional interpolation apparatus of claim21, wherein the characteristics of the input image data indicate edgeinformation and the directional interpolation mode selection unitcalculates a gradient for each of a plurality of directions for thepixel.
 23. The directional interpolation apparatus of claim 22, whereinthe directional interpolation mode selection unit selects a directionhaving a smallest gradient and selects a directional interpolation modecorresponding to the selected direction.
 24. The directionalinterpolation method of claim 22, wherein the plurality of directionscomprise at least one angle direction between horizontal and verticaldirections.
 25. The directional interpolation method of claim 24,wherein the respective pixels comprise at least one of a one-half pixel,a one-quarter pixel and a one-eighth pixel.
 26. A directionalinterpolation apparatus comprising: a mode information extraction unitwhich extracts mode information from a received bitstream, the modeinformation indicating a directional interpolation mode that is selectedamong a plurality of directional interpolation modes based oncharacteristics of input video data; and a directional interpolationunit which performs directional interpolation on a predetermined-sizeblock based on the extracted mode information.
 27. The directionalinterpolation apparatus of claim 26, wherein the characteristics of theinput image data indicate edge information and the selection of thedirectional interpolation mode is performed based on a gradient for eachof a plurality of directions with respect to each of respective pixelsincluded in the predetermined-size block.
 28. A video encoder comprisinga directional interpolation apparatus, wherein the directionalinterpolation apparatus comprises: a directional interpolation modeselection unit which selects one of a plurality of directionalinterpolation modes for a predetermined-size block based oncharacteristics of input video data; a directional interpolation unitwhich performs directional interpolation on the predetermined-size blockbased on the selected directional interpolation mode; and a modeinformation generation unit which generates mode information indicatingthe selected directional interpolation mode.
 29. A video encodercomprising a directional interpolation apparatus, wherein thedirectional interpolation apparatus comprises: a directionalinterpolation mode selection unit which selects one of a plurality ofdirectional interpolation modes for each of a plurality of pixels basedon characteristics of input video data; and a directional interpolationunit which performs directional interpolation on the pixels based on theselected directional interpolation mode.
 30. A video decoder comprisinga directional interpolation apparatus, wherein the directionalinterpolation apparatus comprises: a mode information extraction unitwhich extracts mode information from a received bitstream, the modeinformation indicating a directional interpolation mode that is selectedamong a plurality of directional interpolation modes based oncharacteristics of input video data; and a directional interpolationunit which performs directional interpolation on a predetermined-sizeblock based on the extracted mode information.
 31. A computer-readablerecording medium having recorded thereon a program for a directionalinterpolation method, the directional interpolation method comprising:selecting one of a plurality of directional interpolation modes for apredetermined-size block based on characteristics of input video data;performing directional interpolation on the predetermined-size blockbased on the selected directional interpolation mode; and generatingmode information indicating the selected directional interpolation mode.32. A computer-readable recording medium having recorded thereon aprogram for a directional interpolation method, the directionalinterpolation method comprising: selecting one of a plurality ofdirectional interpolation modes for each pixel based on characteristicsof input video data; and performing directional interpolation on thepixel based on the selected directional interpolation mode.
 33. Acomputer-readable recording medium having recorded. thereon a programfor a directional interpolation method, the directional interpolationmethod comprising: extracting mode information from a receivedbitstream, the mode information indicating a directional interpolationmode that is selected among a plurality of directional interpolationmodes based on characteristics of input video data; and performingdirectional interpolation on a predetermined-size block based on theextracted mode information.
 34. A video decoding method using adirectional interpolation method, the directional interpolation methodcomprising: selecting one of a plurality of directional interpolationmodes for each pixel based on characteristics of input video data; andperforming directional interpolation on a predetermined-size block basedon the selected directional interpolation mode.